using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
	[Table("bgm_project_control_expense"), DataContract]
    public class ProjectControlExpense
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "ProjCtrlExpId", ResourceType = typeof(Resources.ProjectControlExpenseResource))]
        [Column("bgm_proj_ctrl_exp_seq", TypeName="int")]
        public int ProjCtrlExpId { get; set; }

        [ForeignKey("ProjectControl")]
		[DataMember, Display(Name = "ProjCtrlId", ResourceType = typeof(Resources.ProjectControlExpenseResource))]
        [Column("bgm_proj_ctrl_seq", TypeName="int")]
        public Nullable<int> ProjCtrlId { get; set; }

		[DataMember, Display(Name = "CtrlType", ResourceType = typeof(Resources.ProjectControlExpenseResource))]
		[Column("ctrl_type", TypeName="ntext")]
        public string CtrlType { get; set; }

        [ForeignKey("ProjectExpense")]
		[DataMember, Display(Name = "ProjExpId", ResourceType = typeof(Resources.ProjectControlExpenseResource))]
        [Column("bgm_proj_exp_seq", TypeName="int")]
        public Nullable<int> ProjExpId { get; set; }

		[DataMember, Display(Name = "Amount", ResourceType = typeof(Resources.ProjectControlExpenseResource))]
		[Column("amount", TypeName="decimal")]
        public Nullable<double> Amount { get; set; }

        [DataMember]
        public virtual ProjectControl ProjectControl { get; set; }

        [DataMember]
        public virtual ProjectExpense ProjectExpense { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}